package chalmersbot;
import chalmersbot.Absyn.*;

public class PrettyPrinter
{
  //For certain applications increasing the initial size of the buffer may improve performance.
  private static final int INITIAL_BUFFER_SIZE = 128;
  //You may wish to change the parentheses used in precedence.
  private static final String _L_PAREN = new String("(");
  private static final String _R_PAREN = new String(")");
  //You may wish to change render
  private static void render(String s)
  {
    if (s.equals("{"))
    {
       buf_.append("\n");
       indent();
       buf_.append(s);
       _n_ = _n_ + 2;
       buf_.append("\n");
       indent();
    }
    else if (s.equals("(") || s.equals("["))
       buf_.append(s);
    else if (s.equals(")") || s.equals("]"))
    {
       backup();
       buf_.append(s);
       buf_.append(" ");
    }
    else if (s.equals("}"))
    {
       _n_ = _n_ - 2;
       backup();
       backup();
       buf_.append(s);
       buf_.append("\n");
       indent();
    }
    else if (s.equals(","))
    {
       backup();
       buf_.append(s);
       buf_.append(" ");
    }
    else if (s.equals(";"))
    {
       backup();
       buf_.append(s);
       buf_.append("\n");
       indent();
    }
    else if (s.equals("")) return;
    else
    {
       buf_.append(s);
       buf_.append(" ");
    }
  }


  //  print and show methods are defined for each category.
  public static String print(chalmersbot.Absyn.Sentence foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Sentence foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.IPhrase foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.IPhrase foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.QPhrase foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.QPhrase foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Phrase foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Phrase foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.QWInW foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.QWInW foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.QWHow foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.QWHow foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.QWord foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.QWord foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.AuxVerb foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.AuxVerb foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.IsVrb foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.IsVrb foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Vrb foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Vrb foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.ToWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.ToWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.GoingWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.GoingWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Verb foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Verb foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.VerbWord foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.VerbWord foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.InWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.InWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Preposition foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Preposition foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.NumberRule foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.NumberRule foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Credit foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Credit foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.CreditWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.CreditWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Ects foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Ects foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.CreditNr foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.CreditNr foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Adjective foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Adjective foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.ManyWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.ManyWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.SpecialWordToken foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.SpecialWordToken foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.NameRule foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.NameRule foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.Subject foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.Subject foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.SubjectLst foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.SubjectLst foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String print(chalmersbot.Absyn.SubjectWrd foo)
  {
    pp(foo, 0);
    trim();
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  public static String show(chalmersbot.Absyn.SubjectWrd foo)
  {
    sh(foo);
    String temp = buf_.toString();
    buf_.delete(0,buf_.length());
    return temp;
  }
  /***   You shouldn't need to change anything beyond this point.   ***/

  private static void pp(chalmersbot.Absyn.Sentence foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QSentence)
    {
       chalmersbot.Absyn.QSentence _qsentence = (chalmersbot.Absyn.QSentence) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qsentence.qphrase_, 0);
       render("?");
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.ISentenceD)
    {
       chalmersbot.Absyn.ISentenceD _isentenced = (chalmersbot.Absyn.ISentenceD) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isentenced.iphrase_, 0);
       render(".");
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.ISentence)
    {
       chalmersbot.Absyn.ISentence _isentence = (chalmersbot.Absyn.ISentence) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isentence.iphrase_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.IPhrase foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.ISubNr)
    {
       chalmersbot.Absyn.ISubNr _isubnr = (chalmersbot.Absyn.ISubNr) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isubnr.numberrule_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.ISub)
    {
       chalmersbot.Absyn.ISub _isub = (chalmersbot.Absyn.ISub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isub.subject_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.ISubIsSub)
    {
       chalmersbot.Absyn.ISubIsSub _isubissub = (chalmersbot.Absyn.ISubIsSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isubissub.subject_1, 0);
       pp(_isubissub.isvrb_, 0);
       pp(_isubissub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.QPhrase foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QPhraseSimple)
    {
       chalmersbot.Absyn.QPhraseSimple _qphrasesimple = (chalmersbot.Absyn.QPhraseSimple) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qphrasesimple.phrase_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Phrase foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QYNVerbSubVerb)
    {
       chalmersbot.Absyn.QYNVerbSubVerb _qynverbsubverb = (chalmersbot.Absyn.QYNVerbSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qynverbsubverb.verb_1, 0);
       pp(_qynverbsubverb.subject_, 0);
       pp(_qynverbsubverb.verb_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QYNVerbSubVerbSub)
    {
       chalmersbot.Absyn.QYNVerbSubVerbSub _qynverbsubverbsub = (chalmersbot.Absyn.QYNVerbSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qynverbsubverbsub.verb_1, 0);
       pp(_qynverbsubverbsub.subject_1, 0);
       pp(_qynverbsubverbsub.verb_2, 0);
       pp(_qynverbsubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QYNIsSub)
    {
       chalmersbot.Absyn.QYNIsSub _qynissub = (chalmersbot.Absyn.QYNIsSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qynissub.isvrb_, 0);
       pp(_qynissub.subject_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QYNIsSubVerbSub)
    {
       chalmersbot.Absyn.QYNIsSubVerbSub _qynissubverbsub = (chalmersbot.Absyn.QYNIsSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qynissubverbsub.isvrb_, 0);
       pp(_qynissubverbsub.subject_1, 0);
       pp(_qynissubverbsub.verb_, 0);
       pp(_qynissubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordIsSub)
    {
       chalmersbot.Absyn.QWordIsSub _qwordissub = (chalmersbot.Absyn.QWordIsSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordissub.qword_, 0);
       pp(_qwordissub.isvrb_, 0);
       pp(_qwordissub.subject_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordIsSubVerb)
    {
       chalmersbot.Absyn.QWordIsSubVerb _qwordissubverb = (chalmersbot.Absyn.QWordIsSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordissubverb.qword_, 0);
       pp(_qwordissubverb.isvrb_, 0);
       pp(_qwordissubverb.subject_, 0);
       pp(_qwordissubverb.verb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordIsSubVerbSub)
    {
       chalmersbot.Absyn.QWordIsSubVerbSub _qwordissubverbsub = (chalmersbot.Absyn.QWordIsSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordissubverbsub.qword_, 0);
       pp(_qwordissubverbsub.isvrb_, 0);
       pp(_qwordissubverbsub.subject_1, 0);
       pp(_qwordissubverbsub.verb_, 0);
       pp(_qwordissubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordSubVerb)
    {
       chalmersbot.Absyn.QWordSubVerb _qwordsubverb = (chalmersbot.Absyn.QWordSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordsubverb.qword_, 0);
       pp(_qwordsubverb.subject_, 0);
       pp(_qwordsubverb.verb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordSubVerbSub)
    {
       chalmersbot.Absyn.QWordSubVerbSub _qwordsubverbsub = (chalmersbot.Absyn.QWordSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordsubverbsub.qword_, 0);
       pp(_qwordsubverbsub.subject_1, 0);
       pp(_qwordsubverbsub.verb_, 0);
       pp(_qwordsubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordSubIsSub)
    {
       chalmersbot.Absyn.QWordSubIsSub _qwordsubissub = (chalmersbot.Absyn.QWordSubIsSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordsubissub.qword_, 0);
       pp(_qwordsubissub.subject_1, 0);
       pp(_qwordsubissub.isvrb_, 0);
       pp(_qwordsubissub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordSubIsSubVerb)
    {
       chalmersbot.Absyn.QWordSubIsSubVerb _qwordsubissubverb = (chalmersbot.Absyn.QWordSubIsSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordsubissubverb.qword_, 0);
       pp(_qwordsubissubverb.subject_1, 0);
       pp(_qwordsubissubverb.isvrb_, 0);
       pp(_qwordsubissubverb.subject_2, 0);
       pp(_qwordsubissubverb.verb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordVerbSub)
    {
       chalmersbot.Absyn.QWordVerbSub _qwordverbsub = (chalmersbot.Absyn.QWordVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordverbsub.qword_, 0);
       pp(_qwordverbsub.verb_, 0);
       pp(_qwordverbsub.subject_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordVerbSubVerb)
    {
       chalmersbot.Absyn.QWordVerbSubVerb _qwordverbsubverb = (chalmersbot.Absyn.QWordVerbSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordverbsubverb.qword_, 0);
       pp(_qwordverbsubverb.verb_1, 0);
       pp(_qwordverbsubverb.subject_, 0);
       pp(_qwordverbsubverb.verb_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordVerbSubVerbSub)
    {
       chalmersbot.Absyn.QWordVerbSubVerbSub _qwordverbsubverbsub = (chalmersbot.Absyn.QWordVerbSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordverbsubverbsub.qword_, 0);
       pp(_qwordverbsubverbsub.verb_1, 0);
       pp(_qwordverbsubverbsub.subject_1, 0);
       pp(_qwordverbsubverbsub.verb_2, 0);
       pp(_qwordverbsubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSub)
    {
       chalmersbot.Absyn.QInWhichSubIsSub _qinwhichsubissub = (chalmersbot.Absyn.QInWhichSubIsSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubissub.qwinw_, 0);
       pp(_qinwhichsubissub.subject_1, 0);
       pp(_qinwhichsubissub.isvrb_, 0);
       pp(_qinwhichsubissub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSubVerb)
    {
       chalmersbot.Absyn.QInWhichSubIsSubVerb _qinwhichsubissubverb = (chalmersbot.Absyn.QInWhichSubIsSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubissubverb.qwinw_, 0);
       pp(_qinwhichsubissubverb.subject_1, 0);
       pp(_qinwhichsubissubverb.isvrb_, 0);
       pp(_qinwhichsubissubverb.subject_2, 0);
       pp(_qinwhichsubissubverb.verb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubIsSubVerbSub _qinwhichsubissubverbsub = (chalmersbot.Absyn.QInWhichSubIsSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubissubverbsub.qwinw_, 0);
       pp(_qinwhichsubissubverbsub.subject_1, 0);
       pp(_qinwhichsubissubverbsub.isvrb_, 0);
       pp(_qinwhichsubissubverbsub.subject_2, 0);
       pp(_qinwhichsubissubverbsub.verb_, 0);
       pp(_qinwhichsubissubverbsub.subject_3, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubVerbSub _qinwhichsubverbsub = (chalmersbot.Absyn.QInWhichSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubverbsub.qwinw_, 0);
       pp(_qinwhichsubverbsub.subject_1, 0);
       pp(_qinwhichsubverbsub.verb_, 0);
       pp(_qinwhichsubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSubVerb)
    {
       chalmersbot.Absyn.QInWhichSubVerbSubVerb _qinwhichsubverbsubverb = (chalmersbot.Absyn.QInWhichSubVerbSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubverbsubverb.qwinw_, 0);
       pp(_qinwhichsubverbsubverb.subject_1, 0);
       pp(_qinwhichsubverbsubverb.verb_1, 0);
       pp(_qinwhichsubverbsubverb.subject_2, 0);
       pp(_qinwhichsubverbsubverb.verb_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubVerbSubVerbSub _qinwhichsubverbsubverbsub = (chalmersbot.Absyn.QInWhichSubVerbSubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qinwhichsubverbsubverbsub.qwinw_, 0);
       pp(_qinwhichsubverbsubverbsub.subject_1, 0);
       pp(_qinwhichsubverbsubverbsub.verb_1, 0);
       pp(_qinwhichsubverbsubverbsub.subject_2, 0);
       pp(_qinwhichsubverbsubverbsub.verb_2, 0);
       pp(_qinwhichsubverbsubverbsub.subject_3, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QHowManySubVerbSub)
    {
       chalmersbot.Absyn.QHowManySubVerbSub _qhowmanysubverbsub = (chalmersbot.Absyn.QHowManySubVerbSub) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qhowmanysubverbsub.qwhow_, 0);
       pp(_qhowmanysubverbsub.subject_1, 0);
       pp(_qhowmanysubverbsub.verb_, 0);
       pp(_qhowmanysubverbsub.subject_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QHowManySubVerbSubVerb)
    {
       chalmersbot.Absyn.QHowManySubVerbSubVerb _qhowmanysubverbsubverb = (chalmersbot.Absyn.QHowManySubVerbSubVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qhowmanysubverbsubverb.qwhow_, 0);
       pp(_qhowmanysubverbsubverb.subject_1, 0);
       pp(_qhowmanysubverbsubverb.verb_1, 0);
       pp(_qhowmanysubverbsubverb.subject_2, 0);
       pp(_qhowmanysubverbsubverb.verb_2, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.QWInW foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QWInW_1)
    {
       chalmersbot.Absyn.QWInW_1 _qwinw_1 = (chalmersbot.Absyn.QWInW_1) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwinw_1.inwrd_, 0);
       pp(_qwinw_1.qwhichtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWInW_2)
    {
       chalmersbot.Absyn.QWInW_2 _qwinw_2 = (chalmersbot.Absyn.QWInW_2) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwinw_2.inwrd_, 0);
       pp(_qwinw_2.qwhattoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.QWHow foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QWHowMany)
    {
       chalmersbot.Absyn.QWHowMany _qwhowmany = (chalmersbot.Absyn.QWHowMany) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwhowmany.qhowtoken_, 0);
       pp(_qwhowmany.manywrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.QWord foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.QWordQWordToken)
    {
       chalmersbot.Absyn.QWordQWordToken _qwordqwordtoken = (chalmersbot.Absyn.QWordQWordToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordqwordtoken.qwordtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordQWhichToken)
    {
       chalmersbot.Absyn.QWordQWhichToken _qwordqwhichtoken = (chalmersbot.Absyn.QWordQWhichToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordqwhichtoken.qwhichtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordQHowToken)
    {
       chalmersbot.Absyn.QWordQHowToken _qwordqhowtoken = (chalmersbot.Absyn.QWordQHowToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordqhowtoken.qhowtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.QWordQWhatToken)
    {
       chalmersbot.Absyn.QWordQWhatToken _qwordqwhattoken = (chalmersbot.Absyn.QWordQWhatToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_qwordqwhattoken.qwhattoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.AuxVerb foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.AuxiliaryVerb)
    {
       chalmersbot.Absyn.AuxiliaryVerb _auxiliaryverb = (chalmersbot.Absyn.AuxiliaryVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_auxiliaryverb.auxiliarytoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.IsVrb foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.IsVerb)
    {
       chalmersbot.Absyn.IsVerb _isverb = (chalmersbot.Absyn.IsVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_isverb.istoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Vrb foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.RegularVerb)
    {
       chalmersbot.Absyn.RegularVerb _regularverb = (chalmersbot.Absyn.RegularVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_regularverb.verbtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.ToWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.ToWord)
    {
       chalmersbot.Absyn.ToWord _toword = (chalmersbot.Absyn.ToWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_toword.totoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.GoingWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.GoingWord)
    {
       chalmersbot.Absyn.GoingWord _goingword = (chalmersbot.Absyn.GoingWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_goingword.goingtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Verb foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.VerbBasic)
    {
       chalmersbot.Absyn.VerbBasic _verbbasic = (chalmersbot.Absyn.VerbBasic) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbbasic.verbword_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbIsVerb)
    {
       chalmersbot.Absyn.VerbIsVerb _verbisverb = (chalmersbot.Absyn.VerbIsVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbisverb.isvrb_, 0);
       pp(_verbisverb.vrb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbGointTo)
    {
       chalmersbot.Absyn.VerbGointTo _verbgointto = (chalmersbot.Absyn.VerbGointTo) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbgointto.goingwrd_, 0);
       pp(_verbgointto.towrd_, 0);
       pp(_verbgointto.verbword_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbGoing)
    {
       chalmersbot.Absyn.VerbGoing _verbgoing = (chalmersbot.Absyn.VerbGoing) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbgoing.goingtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbTo)
    {
       chalmersbot.Absyn.VerbTo _verbto = (chalmersbot.Absyn.VerbTo) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbto.totoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.VerbWord foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.VerbWordVerb)
    {
       chalmersbot.Absyn.VerbWordVerb _verbwordverb = (chalmersbot.Absyn.VerbWordVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbwordverb.vrb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbWordAux)
    {
       chalmersbot.Absyn.VerbWordAux _verbwordaux = (chalmersbot.Absyn.VerbWordAux) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbwordaux.auxverb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.VerbWordAuxVerb)
    {
       chalmersbot.Absyn.VerbWordAuxVerb _verbwordauxverb = (chalmersbot.Absyn.VerbWordAuxVerb) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_verbwordauxverb.auxverb_, 0);
       pp(_verbwordauxverb.vrb_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.InWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.InWord)
    {
       chalmersbot.Absyn.InWord _inword = (chalmersbot.Absyn.InWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_inword.intoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Preposition foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.Prepositions)
    {
       chalmersbot.Absyn.Prepositions _prepositions = (chalmersbot.Absyn.Prepositions) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_prepositions.inwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.PrepositionsTok)
    {
       chalmersbot.Absyn.PrepositionsTok _prepositionstok = (chalmersbot.Absyn.PrepositionsTok) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_prepositionstok.prepositiontoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.NumberRule foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.NumberRuleNumberDigitToken)
    {
       chalmersbot.Absyn.NumberRuleNumberDigitToken _numberrulenumberdigittoken = (chalmersbot.Absyn.NumberRuleNumberDigitToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_numberrulenumberdigittoken.numberdigittoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.NumberRuleNumberTextToken)
    {
       chalmersbot.Absyn.NumberRuleNumberTextToken _numberrulenumbertexttoken = (chalmersbot.Absyn.NumberRuleNumberTextToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_numberrulenumbertexttoken.numbertexttoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Credit foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.CreditNrEC)
    {
       chalmersbot.Absyn.CreditNrEC _creditnrec = (chalmersbot.Absyn.CreditNrEC) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditnrec.creditnr_, 0);
       pp(_creditnrec.ects_, 0);
       pp(_creditnrec.creditwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditNrE)
    {
       chalmersbot.Absyn.CreditNrE _creditnre = (chalmersbot.Absyn.CreditNrE) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditnre.creditnr_, 0);
       pp(_creditnre.ects_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditNrC)
    {
       chalmersbot.Absyn.CreditNrC _creditnrc = (chalmersbot.Absyn.CreditNrC) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditnrc.creditnr_, 0);
       pp(_creditnrc.creditwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditE)
    {
       chalmersbot.Absyn.CreditE _credite = (chalmersbot.Absyn.CreditE) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_credite.ects_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditEC)
    {
       chalmersbot.Absyn.CreditEC _creditec = (chalmersbot.Absyn.CreditEC) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditec.ects_, 0);
       pp(_creditec.creditwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditC)
    {
       chalmersbot.Absyn.CreditC _creditc = (chalmersbot.Absyn.CreditC) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditc.creditwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.CreditWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.CreditWord)
    {
       chalmersbot.Absyn.CreditWord _creditword = (chalmersbot.Absyn.CreditWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditword.credittoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Ects foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.EctsWord)
    {
       chalmersbot.Absyn.EctsWord _ectsword = (chalmersbot.Absyn.EctsWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_ectsword.ectstoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.CreditNr foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.CreditNrCreditNrToken)
    {
       chalmersbot.Absyn.CreditNrCreditNrToken _creditnrcreditnrtoken = (chalmersbot.Absyn.CreditNrCreditNrToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditnrcreditnrtoken.creditnrtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.CreditNrNumberDigitToken)
    {
       chalmersbot.Absyn.CreditNrNumberDigitToken _creditnrnumberdigittoken = (chalmersbot.Absyn.CreditNrNumberDigitToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_creditnrnumberdigittoken.numberdigittoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Adjective foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.AdjectiveAdjectivesToken)
    {
       chalmersbot.Absyn.AdjectiveAdjectivesToken _adjectiveadjectivestoken = (chalmersbot.Absyn.AdjectiveAdjectivesToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_adjectiveadjectivestoken.adjectivestoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.AdjectiveManyWrd)
    {
       chalmersbot.Absyn.AdjectiveManyWrd _adjectivemanywrd = (chalmersbot.Absyn.AdjectiveManyWrd) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_adjectivemanywrd.manywrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.ManyWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.ManyWord)
    {
       chalmersbot.Absyn.ManyWord _manyword = (chalmersbot.Absyn.ManyWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_manyword.manytoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.SpecialWordToken foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.SpecialWordTokenSNounSToken)
    {
       chalmersbot.Absyn.SpecialWordTokenSNounSToken _specialwordtokensnounstoken = (chalmersbot.Absyn.SpecialWordTokenSNounSToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_specialwordtokensnounstoken.snounstoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SpecialWordTokenSNounEsToken)
    {
       chalmersbot.Absyn.SpecialWordTokenSNounEsToken _specialwordtokensnounestoken = (chalmersbot.Absyn.SpecialWordTokenSNounEsToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_specialwordtokensnounestoken.snounestoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.NameRule foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.NameRuleNameToken)
    {
       chalmersbot.Absyn.NameRuleNameToken _namerulenametoken = (chalmersbot.Absyn.NameRuleNameToken) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_namerulenametoken.nametoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.Subject foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectToList)
    {
       chalmersbot.Absyn.SubjectToList _subjecttolist = (chalmersbot.Absyn.SubjectToList) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjecttolist.subjectlst_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.SubjectLst foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectList)
    {
       chalmersbot.Absyn.SubjectList _subjectlist = (chalmersbot.Absyn.SubjectList) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectlist.subjectlst_, 0);
       pp(_subjectlist.subjectwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectListElement)
    {
       chalmersbot.Absyn.SubjectListElement _subjectlistelement = (chalmersbot.Absyn.SubjectListElement) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectlistelement.subjectwrd_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }

  private static void pp(chalmersbot.Absyn.SubjectWrd foo, int _i_)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectBasic)
    {
       chalmersbot.Absyn.SubjectBasic _subjectbasic = (chalmersbot.Absyn.SubjectBasic) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectbasic.subjecttoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectSpecialWord)
    {
       chalmersbot.Absyn.SubjectSpecialWord _subjectspecialword = (chalmersbot.Absyn.SubjectSpecialWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectspecialword.specialwordtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectDeterminant)
    {
       chalmersbot.Absyn.SubjectDeterminant _subjectdeterminant = (chalmersbot.Absyn.SubjectDeterminant) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectdeterminant.determinanttoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectSmallWord)
    {
       chalmersbot.Absyn.SubjectSmallWord _subjectsmallword = (chalmersbot.Absyn.SubjectSmallWord) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectsmallword.smallwordtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectPronoun)
    {
       chalmersbot.Absyn.SubjectPronoun _subjectpronoun = (chalmersbot.Absyn.SubjectPronoun) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectpronoun.pronountoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectPeriod)
    {
       chalmersbot.Absyn.SubjectPeriod _subjectperiod = (chalmersbot.Absyn.SubjectPeriod) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectperiod.periodtoken_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectPeriodNr)
    {
       chalmersbot.Absyn.SubjectPeriodNr _subjectperiodnr = (chalmersbot.Absyn.SubjectPeriodNr) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectperiodnr.periodtoken_, 0);
       pp(_subjectperiodnr.numberrule_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectName)
    {
       chalmersbot.Absyn.SubjectName _subjectname = (chalmersbot.Absyn.SubjectName) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectname.namerule_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectNumber)
    {
       chalmersbot.Absyn.SubjectNumber _subjectnumber = (chalmersbot.Absyn.SubjectNumber) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectnumber.credit_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectPreposition)
    {
       chalmersbot.Absyn.SubjectPreposition _subjectpreposition = (chalmersbot.Absyn.SubjectPreposition) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectpreposition.preposition_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
    else     if (foo instanceof chalmersbot.Absyn.SubjectAdjective)
    {
       chalmersbot.Absyn.SubjectAdjective _subjectadjective = (chalmersbot.Absyn.SubjectAdjective) foo;
       if (_i_ > 0) render(_L_PAREN);
       pp(_subjectadjective.adjective_, 0);
       if (_i_ > 0) render(_R_PAREN);
    }
  }


  private static void sh(chalmersbot.Absyn.Sentence foo)
  {
    if (foo instanceof chalmersbot.Absyn.QSentence)
    {
       chalmersbot.Absyn.QSentence _qsentence = (chalmersbot.Absyn.QSentence) foo;
       render("(");
       render("QSentence");
       sh(_qsentence.qphrase_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.ISentenceD)
    {
       chalmersbot.Absyn.ISentenceD _isentenced = (chalmersbot.Absyn.ISentenceD) foo;
       render("(");
       render("ISentenceD");
       sh(_isentenced.iphrase_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.ISentence)
    {
       chalmersbot.Absyn.ISentence _isentence = (chalmersbot.Absyn.ISentence) foo;
       render("(");
       render("ISentence");
       sh(_isentence.iphrase_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.IPhrase foo)
  {
    if (foo instanceof chalmersbot.Absyn.ISubNr)
    {
       chalmersbot.Absyn.ISubNr _isubnr = (chalmersbot.Absyn.ISubNr) foo;
       render("(");
       render("ISubNr");
       sh(_isubnr.numberrule_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.ISub)
    {
       chalmersbot.Absyn.ISub _isub = (chalmersbot.Absyn.ISub) foo;
       render("(");
       render("ISub");
       sh(_isub.subject_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.ISubIsSub)
    {
       chalmersbot.Absyn.ISubIsSub _isubissub = (chalmersbot.Absyn.ISubIsSub) foo;
       render("(");
       render("ISubIsSub");
       sh(_isubissub.subject_1);
       sh(_isubissub.isvrb_);
       sh(_isubissub.subject_2);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.QPhrase foo)
  {
    if (foo instanceof chalmersbot.Absyn.QPhraseSimple)
    {
       chalmersbot.Absyn.QPhraseSimple _qphrasesimple = (chalmersbot.Absyn.QPhraseSimple) foo;
       render("(");
       render("QPhraseSimple");
       sh(_qphrasesimple.phrase_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Phrase foo)
  {
    if (foo instanceof chalmersbot.Absyn.QYNVerbSubVerb)
    {
       chalmersbot.Absyn.QYNVerbSubVerb _qynverbsubverb = (chalmersbot.Absyn.QYNVerbSubVerb) foo;
       render("(");
       render("QYNVerbSubVerb");
       sh(_qynverbsubverb.verb_1);
       sh(_qynverbsubverb.subject_);
       sh(_qynverbsubverb.verb_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QYNVerbSubVerbSub)
    {
       chalmersbot.Absyn.QYNVerbSubVerbSub _qynverbsubverbsub = (chalmersbot.Absyn.QYNVerbSubVerbSub) foo;
       render("(");
       render("QYNVerbSubVerbSub");
       sh(_qynverbsubverbsub.verb_1);
       sh(_qynverbsubverbsub.subject_1);
       sh(_qynverbsubverbsub.verb_2);
       sh(_qynverbsubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QYNIsSub)
    {
       chalmersbot.Absyn.QYNIsSub _qynissub = (chalmersbot.Absyn.QYNIsSub) foo;
       render("(");
       render("QYNIsSub");
       sh(_qynissub.isvrb_);
       sh(_qynissub.subject_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QYNIsSubVerbSub)
    {
       chalmersbot.Absyn.QYNIsSubVerbSub _qynissubverbsub = (chalmersbot.Absyn.QYNIsSubVerbSub) foo;
       render("(");
       render("QYNIsSubVerbSub");
       sh(_qynissubverbsub.isvrb_);
       sh(_qynissubverbsub.subject_1);
       sh(_qynissubverbsub.verb_);
       sh(_qynissubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordIsSub)
    {
       chalmersbot.Absyn.QWordIsSub _qwordissub = (chalmersbot.Absyn.QWordIsSub) foo;
       render("(");
       render("QWordIsSub");
       sh(_qwordissub.qword_);
       sh(_qwordissub.isvrb_);
       sh(_qwordissub.subject_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordIsSubVerb)
    {
       chalmersbot.Absyn.QWordIsSubVerb _qwordissubverb = (chalmersbot.Absyn.QWordIsSubVerb) foo;
       render("(");
       render("QWordIsSubVerb");
       sh(_qwordissubverb.qword_);
       sh(_qwordissubverb.isvrb_);
       sh(_qwordissubverb.subject_);
       sh(_qwordissubverb.verb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordIsSubVerbSub)
    {
       chalmersbot.Absyn.QWordIsSubVerbSub _qwordissubverbsub = (chalmersbot.Absyn.QWordIsSubVerbSub) foo;
       render("(");
       render("QWordIsSubVerbSub");
       sh(_qwordissubverbsub.qword_);
       sh(_qwordissubverbsub.isvrb_);
       sh(_qwordissubverbsub.subject_1);
       sh(_qwordissubverbsub.verb_);
       sh(_qwordissubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordSubVerb)
    {
       chalmersbot.Absyn.QWordSubVerb _qwordsubverb = (chalmersbot.Absyn.QWordSubVerb) foo;
       render("(");
       render("QWordSubVerb");
       sh(_qwordsubverb.qword_);
       sh(_qwordsubverb.subject_);
       sh(_qwordsubverb.verb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordSubVerbSub)
    {
       chalmersbot.Absyn.QWordSubVerbSub _qwordsubverbsub = (chalmersbot.Absyn.QWordSubVerbSub) foo;
       render("(");
       render("QWordSubVerbSub");
       sh(_qwordsubverbsub.qword_);
       sh(_qwordsubverbsub.subject_1);
       sh(_qwordsubverbsub.verb_);
       sh(_qwordsubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordSubIsSub)
    {
       chalmersbot.Absyn.QWordSubIsSub _qwordsubissub = (chalmersbot.Absyn.QWordSubIsSub) foo;
       render("(");
       render("QWordSubIsSub");
       sh(_qwordsubissub.qword_);
       sh(_qwordsubissub.subject_1);
       sh(_qwordsubissub.isvrb_);
       sh(_qwordsubissub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordSubIsSubVerb)
    {
       chalmersbot.Absyn.QWordSubIsSubVerb _qwordsubissubverb = (chalmersbot.Absyn.QWordSubIsSubVerb) foo;
       render("(");
       render("QWordSubIsSubVerb");
       sh(_qwordsubissubverb.qword_);
       sh(_qwordsubissubverb.subject_1);
       sh(_qwordsubissubverb.isvrb_);
       sh(_qwordsubissubverb.subject_2);
       sh(_qwordsubissubverb.verb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordVerbSub)
    {
       chalmersbot.Absyn.QWordVerbSub _qwordverbsub = (chalmersbot.Absyn.QWordVerbSub) foo;
       render("(");
       render("QWordVerbSub");
       sh(_qwordverbsub.qword_);
       sh(_qwordverbsub.verb_);
       sh(_qwordverbsub.subject_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordVerbSubVerb)
    {
       chalmersbot.Absyn.QWordVerbSubVerb _qwordverbsubverb = (chalmersbot.Absyn.QWordVerbSubVerb) foo;
       render("(");
       render("QWordVerbSubVerb");
       sh(_qwordverbsubverb.qword_);
       sh(_qwordverbsubverb.verb_1);
       sh(_qwordverbsubverb.subject_);
       sh(_qwordverbsubverb.verb_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordVerbSubVerbSub)
    {
       chalmersbot.Absyn.QWordVerbSubVerbSub _qwordverbsubverbsub = (chalmersbot.Absyn.QWordVerbSubVerbSub) foo;
       render("(");
       render("QWordVerbSubVerbSub");
       sh(_qwordverbsubverbsub.qword_);
       sh(_qwordverbsubverbsub.verb_1);
       sh(_qwordverbsubverbsub.subject_1);
       sh(_qwordverbsubverbsub.verb_2);
       sh(_qwordverbsubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSub)
    {
       chalmersbot.Absyn.QInWhichSubIsSub _qinwhichsubissub = (chalmersbot.Absyn.QInWhichSubIsSub) foo;
       render("(");
       render("QInWhichSubIsSub");
       sh(_qinwhichsubissub.qwinw_);
       sh(_qinwhichsubissub.subject_1);
       sh(_qinwhichsubissub.isvrb_);
       sh(_qinwhichsubissub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSubVerb)
    {
       chalmersbot.Absyn.QInWhichSubIsSubVerb _qinwhichsubissubverb = (chalmersbot.Absyn.QInWhichSubIsSubVerb) foo;
       render("(");
       render("QInWhichSubIsSubVerb");
       sh(_qinwhichsubissubverb.qwinw_);
       sh(_qinwhichsubissubverb.subject_1);
       sh(_qinwhichsubissubverb.isvrb_);
       sh(_qinwhichsubissubverb.subject_2);
       sh(_qinwhichsubissubverb.verb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubIsSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubIsSubVerbSub _qinwhichsubissubverbsub = (chalmersbot.Absyn.QInWhichSubIsSubVerbSub) foo;
       render("(");
       render("QInWhichSubIsSubVerbSub");
       sh(_qinwhichsubissubverbsub.qwinw_);
       sh(_qinwhichsubissubverbsub.subject_1);
       sh(_qinwhichsubissubverbsub.isvrb_);
       sh(_qinwhichsubissubverbsub.subject_2);
       sh(_qinwhichsubissubverbsub.verb_);
       sh(_qinwhichsubissubverbsub.subject_3);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubVerbSub _qinwhichsubverbsub = (chalmersbot.Absyn.QInWhichSubVerbSub) foo;
       render("(");
       render("QInWhichSubVerbSub");
       sh(_qinwhichsubverbsub.qwinw_);
       sh(_qinwhichsubverbsub.subject_1);
       sh(_qinwhichsubverbsub.verb_);
       sh(_qinwhichsubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSubVerb)
    {
       chalmersbot.Absyn.QInWhichSubVerbSubVerb _qinwhichsubverbsubverb = (chalmersbot.Absyn.QInWhichSubVerbSubVerb) foo;
       render("(");
       render("QInWhichSubVerbSubVerb");
       sh(_qinwhichsubverbsubverb.qwinw_);
       sh(_qinwhichsubverbsubverb.subject_1);
       sh(_qinwhichsubverbsubverb.verb_1);
       sh(_qinwhichsubverbsubverb.subject_2);
       sh(_qinwhichsubverbsubverb.verb_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QInWhichSubVerbSubVerbSub)
    {
       chalmersbot.Absyn.QInWhichSubVerbSubVerbSub _qinwhichsubverbsubverbsub = (chalmersbot.Absyn.QInWhichSubVerbSubVerbSub) foo;
       render("(");
       render("QInWhichSubVerbSubVerbSub");
       sh(_qinwhichsubverbsubverbsub.qwinw_);
       sh(_qinwhichsubverbsubverbsub.subject_1);
       sh(_qinwhichsubverbsubverbsub.verb_1);
       sh(_qinwhichsubverbsubverbsub.subject_2);
       sh(_qinwhichsubverbsubverbsub.verb_2);
       sh(_qinwhichsubverbsubverbsub.subject_3);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QHowManySubVerbSub)
    {
       chalmersbot.Absyn.QHowManySubVerbSub _qhowmanysubverbsub = (chalmersbot.Absyn.QHowManySubVerbSub) foo;
       render("(");
       render("QHowManySubVerbSub");
       sh(_qhowmanysubverbsub.qwhow_);
       sh(_qhowmanysubverbsub.subject_1);
       sh(_qhowmanysubverbsub.verb_);
       sh(_qhowmanysubverbsub.subject_2);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QHowManySubVerbSubVerb)
    {
       chalmersbot.Absyn.QHowManySubVerbSubVerb _qhowmanysubverbsubverb = (chalmersbot.Absyn.QHowManySubVerbSubVerb) foo;
       render("(");
       render("QHowManySubVerbSubVerb");
       sh(_qhowmanysubverbsubverb.qwhow_);
       sh(_qhowmanysubverbsubverb.subject_1);
       sh(_qhowmanysubverbsubverb.verb_1);
       sh(_qhowmanysubverbsubverb.subject_2);
       sh(_qhowmanysubverbsubverb.verb_2);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.QWInW foo)
  {
    if (foo instanceof chalmersbot.Absyn.QWInW_1)
    {
       chalmersbot.Absyn.QWInW_1 _qwinw_1 = (chalmersbot.Absyn.QWInW_1) foo;
       render("(");
       render("QWInW_1");
       sh(_qwinw_1.inwrd_);
       sh(_qwinw_1.qwhichtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWInW_2)
    {
       chalmersbot.Absyn.QWInW_2 _qwinw_2 = (chalmersbot.Absyn.QWInW_2) foo;
       render("(");
       render("QWInW_2");
       sh(_qwinw_2.inwrd_);
       sh(_qwinw_2.qwhattoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.QWHow foo)
  {
    if (foo instanceof chalmersbot.Absyn.QWHowMany)
    {
       chalmersbot.Absyn.QWHowMany _qwhowmany = (chalmersbot.Absyn.QWHowMany) foo;
       render("(");
       render("QWHowMany");
       sh(_qwhowmany.qhowtoken_);
       sh(_qwhowmany.manywrd_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.QWord foo)
  {
    if (foo instanceof chalmersbot.Absyn.QWordQWordToken)
    {
       chalmersbot.Absyn.QWordQWordToken _qwordqwordtoken = (chalmersbot.Absyn.QWordQWordToken) foo;
       render("(");
       render("QWordQWordToken");
       sh(_qwordqwordtoken.qwordtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordQWhichToken)
    {
       chalmersbot.Absyn.QWordQWhichToken _qwordqwhichtoken = (chalmersbot.Absyn.QWordQWhichToken) foo;
       render("(");
       render("QWordQWhichToken");
       sh(_qwordqwhichtoken.qwhichtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordQHowToken)
    {
       chalmersbot.Absyn.QWordQHowToken _qwordqhowtoken = (chalmersbot.Absyn.QWordQHowToken) foo;
       render("(");
       render("QWordQHowToken");
       sh(_qwordqhowtoken.qhowtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.QWordQWhatToken)
    {
       chalmersbot.Absyn.QWordQWhatToken _qwordqwhattoken = (chalmersbot.Absyn.QWordQWhatToken) foo;
       render("(");
       render("QWordQWhatToken");
       sh(_qwordqwhattoken.qwhattoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.AuxVerb foo)
  {
    if (foo instanceof chalmersbot.Absyn.AuxiliaryVerb)
    {
       chalmersbot.Absyn.AuxiliaryVerb _auxiliaryverb = (chalmersbot.Absyn.AuxiliaryVerb) foo;
       render("(");
       render("AuxiliaryVerb");
       sh(_auxiliaryverb.auxiliarytoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.IsVrb foo)
  {
    if (foo instanceof chalmersbot.Absyn.IsVerb)
    {
       chalmersbot.Absyn.IsVerb _isverb = (chalmersbot.Absyn.IsVerb) foo;
       render("(");
       render("IsVerb");
       sh(_isverb.istoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Vrb foo)
  {
    if (foo instanceof chalmersbot.Absyn.RegularVerb)
    {
       chalmersbot.Absyn.RegularVerb _regularverb = (chalmersbot.Absyn.RegularVerb) foo;
       render("(");
       render("RegularVerb");
       sh(_regularverb.verbtoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.ToWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.ToWord)
    {
       chalmersbot.Absyn.ToWord _toword = (chalmersbot.Absyn.ToWord) foo;
       render("(");
       render("ToWord");
       sh(_toword.totoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.GoingWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.GoingWord)
    {
       chalmersbot.Absyn.GoingWord _goingword = (chalmersbot.Absyn.GoingWord) foo;
       render("(");
       render("GoingWord");
       sh(_goingword.goingtoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Verb foo)
  {
    if (foo instanceof chalmersbot.Absyn.VerbBasic)
    {
       chalmersbot.Absyn.VerbBasic _verbbasic = (chalmersbot.Absyn.VerbBasic) foo;
       render("(");
       render("VerbBasic");
       sh(_verbbasic.verbword_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbIsVerb)
    {
       chalmersbot.Absyn.VerbIsVerb _verbisverb = (chalmersbot.Absyn.VerbIsVerb) foo;
       render("(");
       render("VerbIsVerb");
       sh(_verbisverb.isvrb_);
       sh(_verbisverb.vrb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbGointTo)
    {
       chalmersbot.Absyn.VerbGointTo _verbgointto = (chalmersbot.Absyn.VerbGointTo) foo;
       render("(");
       render("VerbGointTo");
       sh(_verbgointto.goingwrd_);
       sh(_verbgointto.towrd_);
       sh(_verbgointto.verbword_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbGoing)
    {
       chalmersbot.Absyn.VerbGoing _verbgoing = (chalmersbot.Absyn.VerbGoing) foo;
       render("(");
       render("VerbGoing");
       sh(_verbgoing.goingtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbTo)
    {
       chalmersbot.Absyn.VerbTo _verbto = (chalmersbot.Absyn.VerbTo) foo;
       render("(");
       render("VerbTo");
       sh(_verbto.totoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.VerbWord foo)
  {
    if (foo instanceof chalmersbot.Absyn.VerbWordVerb)
    {
       chalmersbot.Absyn.VerbWordVerb _verbwordverb = (chalmersbot.Absyn.VerbWordVerb) foo;
       render("(");
       render("VerbWordVerb");
       sh(_verbwordverb.vrb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbWordAux)
    {
       chalmersbot.Absyn.VerbWordAux _verbwordaux = (chalmersbot.Absyn.VerbWordAux) foo;
       render("(");
       render("VerbWordAux");
       sh(_verbwordaux.auxverb_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.VerbWordAuxVerb)
    {
       chalmersbot.Absyn.VerbWordAuxVerb _verbwordauxverb = (chalmersbot.Absyn.VerbWordAuxVerb) foo;
       render("(");
       render("VerbWordAuxVerb");
       sh(_verbwordauxverb.auxverb_);
       sh(_verbwordauxverb.vrb_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.InWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.InWord)
    {
       chalmersbot.Absyn.InWord _inword = (chalmersbot.Absyn.InWord) foo;
       render("(");
       render("InWord");
       sh(_inword.intoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Preposition foo)
  {
    if (foo instanceof chalmersbot.Absyn.Prepositions)
    {
       chalmersbot.Absyn.Prepositions _prepositions = (chalmersbot.Absyn.Prepositions) foo;
       render("(");
       render("Prepositions");
       sh(_prepositions.inwrd_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.PrepositionsTok)
    {
       chalmersbot.Absyn.PrepositionsTok _prepositionstok = (chalmersbot.Absyn.PrepositionsTok) foo;
       render("(");
       render("PrepositionsTok");
       sh(_prepositionstok.prepositiontoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.NumberRule foo)
  {
    if (foo instanceof chalmersbot.Absyn.NumberRuleNumberDigitToken)
    {
       chalmersbot.Absyn.NumberRuleNumberDigitToken _numberrulenumberdigittoken = (chalmersbot.Absyn.NumberRuleNumberDigitToken) foo;
       render("(");
       render("NumberRuleNumberDigitToken");
       sh(_numberrulenumberdigittoken.numberdigittoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.NumberRuleNumberTextToken)
    {
       chalmersbot.Absyn.NumberRuleNumberTextToken _numberrulenumbertexttoken = (chalmersbot.Absyn.NumberRuleNumberTextToken) foo;
       render("(");
       render("NumberRuleNumberTextToken");
       sh(_numberrulenumbertexttoken.numbertexttoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Credit foo)
  {
    if (foo instanceof chalmersbot.Absyn.CreditNrEC)
    {
       chalmersbot.Absyn.CreditNrEC _creditnrec = (chalmersbot.Absyn.CreditNrEC) foo;
       render("(");
       render("CreditNrEC");
       sh(_creditnrec.creditnr_);
       sh(_creditnrec.ects_);
       sh(_creditnrec.creditwrd_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditNrE)
    {
       chalmersbot.Absyn.CreditNrE _creditnre = (chalmersbot.Absyn.CreditNrE) foo;
       render("(");
       render("CreditNrE");
       sh(_creditnre.creditnr_);
       sh(_creditnre.ects_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditNrC)
    {
       chalmersbot.Absyn.CreditNrC _creditnrc = (chalmersbot.Absyn.CreditNrC) foo;
       render("(");
       render("CreditNrC");
       sh(_creditnrc.creditnr_);
       sh(_creditnrc.creditwrd_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditE)
    {
       chalmersbot.Absyn.CreditE _credite = (chalmersbot.Absyn.CreditE) foo;
       render("(");
       render("CreditE");
       sh(_credite.ects_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditEC)
    {
       chalmersbot.Absyn.CreditEC _creditec = (chalmersbot.Absyn.CreditEC) foo;
       render("(");
       render("CreditEC");
       sh(_creditec.ects_);
       sh(_creditec.creditwrd_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditC)
    {
       chalmersbot.Absyn.CreditC _creditc = (chalmersbot.Absyn.CreditC) foo;
       render("(");
       render("CreditC");
       sh(_creditc.creditwrd_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.CreditWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.CreditWord)
    {
       chalmersbot.Absyn.CreditWord _creditword = (chalmersbot.Absyn.CreditWord) foo;
       render("(");
       render("CreditWord");
       sh(_creditword.credittoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Ects foo)
  {
    if (foo instanceof chalmersbot.Absyn.EctsWord)
    {
       chalmersbot.Absyn.EctsWord _ectsword = (chalmersbot.Absyn.EctsWord) foo;
       render("(");
       render("EctsWord");
       sh(_ectsword.ectstoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.CreditNr foo)
  {
    if (foo instanceof chalmersbot.Absyn.CreditNrCreditNrToken)
    {
       chalmersbot.Absyn.CreditNrCreditNrToken _creditnrcreditnrtoken = (chalmersbot.Absyn.CreditNrCreditNrToken) foo;
       render("(");
       render("CreditNrCreditNrToken");
       sh(_creditnrcreditnrtoken.creditnrtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.CreditNrNumberDigitToken)
    {
       chalmersbot.Absyn.CreditNrNumberDigitToken _creditnrnumberdigittoken = (chalmersbot.Absyn.CreditNrNumberDigitToken) foo;
       render("(");
       render("CreditNrNumberDigitToken");
       sh(_creditnrnumberdigittoken.numberdigittoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Adjective foo)
  {
    if (foo instanceof chalmersbot.Absyn.AdjectiveAdjectivesToken)
    {
       chalmersbot.Absyn.AdjectiveAdjectivesToken _adjectiveadjectivestoken = (chalmersbot.Absyn.AdjectiveAdjectivesToken) foo;
       render("(");
       render("AdjectiveAdjectivesToken");
       sh(_adjectiveadjectivestoken.adjectivestoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.AdjectiveManyWrd)
    {
       chalmersbot.Absyn.AdjectiveManyWrd _adjectivemanywrd = (chalmersbot.Absyn.AdjectiveManyWrd) foo;
       render("(");
       render("AdjectiveManyWrd");
       sh(_adjectivemanywrd.manywrd_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.ManyWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.ManyWord)
    {
       chalmersbot.Absyn.ManyWord _manyword = (chalmersbot.Absyn.ManyWord) foo;
       render("(");
       render("ManyWord");
       sh(_manyword.manytoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.SpecialWordToken foo)
  {
    if (foo instanceof chalmersbot.Absyn.SpecialWordTokenSNounSToken)
    {
       chalmersbot.Absyn.SpecialWordTokenSNounSToken _specialwordtokensnounstoken = (chalmersbot.Absyn.SpecialWordTokenSNounSToken) foo;
       render("(");
       render("SpecialWordTokenSNounSToken");
       sh(_specialwordtokensnounstoken.snounstoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SpecialWordTokenSNounEsToken)
    {
       chalmersbot.Absyn.SpecialWordTokenSNounEsToken _specialwordtokensnounestoken = (chalmersbot.Absyn.SpecialWordTokenSNounEsToken) foo;
       render("(");
       render("SpecialWordTokenSNounEsToken");
       sh(_specialwordtokensnounestoken.snounestoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.NameRule foo)
  {
    if (foo instanceof chalmersbot.Absyn.NameRuleNameToken)
    {
       chalmersbot.Absyn.NameRuleNameToken _namerulenametoken = (chalmersbot.Absyn.NameRuleNameToken) foo;
       render("(");
       render("NameRuleNameToken");
       sh(_namerulenametoken.nametoken_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.Subject foo)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectToList)
    {
       chalmersbot.Absyn.SubjectToList _subjecttolist = (chalmersbot.Absyn.SubjectToList) foo;
       render("(");
       render("SubjectToList");
       sh(_subjecttolist.subjectlst_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.SubjectLst foo)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectList)
    {
       chalmersbot.Absyn.SubjectList _subjectlist = (chalmersbot.Absyn.SubjectList) foo;
       render("(");
       render("SubjectList");
       sh(_subjectlist.subjectlst_);
       sh(_subjectlist.subjectwrd_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectListElement)
    {
       chalmersbot.Absyn.SubjectListElement _subjectlistelement = (chalmersbot.Absyn.SubjectListElement) foo;
       render("(");
       render("SubjectListElement");
       sh(_subjectlistelement.subjectwrd_);
       render(")");
    }
  }

  private static void sh(chalmersbot.Absyn.SubjectWrd foo)
  {
    if (foo instanceof chalmersbot.Absyn.SubjectBasic)
    {
       chalmersbot.Absyn.SubjectBasic _subjectbasic = (chalmersbot.Absyn.SubjectBasic) foo;
       render("(");
       render("SubjectBasic");
       sh(_subjectbasic.subjecttoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectSpecialWord)
    {
       chalmersbot.Absyn.SubjectSpecialWord _subjectspecialword = (chalmersbot.Absyn.SubjectSpecialWord) foo;
       render("(");
       render("SubjectSpecialWord");
       sh(_subjectspecialword.specialwordtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectDeterminant)
    {
       chalmersbot.Absyn.SubjectDeterminant _subjectdeterminant = (chalmersbot.Absyn.SubjectDeterminant) foo;
       render("(");
       render("SubjectDeterminant");
       sh(_subjectdeterminant.determinanttoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectSmallWord)
    {
       chalmersbot.Absyn.SubjectSmallWord _subjectsmallword = (chalmersbot.Absyn.SubjectSmallWord) foo;
       render("(");
       render("SubjectSmallWord");
       sh(_subjectsmallword.smallwordtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectPronoun)
    {
       chalmersbot.Absyn.SubjectPronoun _subjectpronoun = (chalmersbot.Absyn.SubjectPronoun) foo;
       render("(");
       render("SubjectPronoun");
       sh(_subjectpronoun.pronountoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectPeriod)
    {
       chalmersbot.Absyn.SubjectPeriod _subjectperiod = (chalmersbot.Absyn.SubjectPeriod) foo;
       render("(");
       render("SubjectPeriod");
       sh(_subjectperiod.periodtoken_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectPeriodNr)
    {
       chalmersbot.Absyn.SubjectPeriodNr _subjectperiodnr = (chalmersbot.Absyn.SubjectPeriodNr) foo;
       render("(");
       render("SubjectPeriodNr");
       sh(_subjectperiodnr.periodtoken_);
       sh(_subjectperiodnr.numberrule_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectName)
    {
       chalmersbot.Absyn.SubjectName _subjectname = (chalmersbot.Absyn.SubjectName) foo;
       render("(");
       render("SubjectName");
       sh(_subjectname.namerule_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectNumber)
    {
       chalmersbot.Absyn.SubjectNumber _subjectnumber = (chalmersbot.Absyn.SubjectNumber) foo;
       render("(");
       render("SubjectNumber");
       sh(_subjectnumber.credit_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectPreposition)
    {
       chalmersbot.Absyn.SubjectPreposition _subjectpreposition = (chalmersbot.Absyn.SubjectPreposition) foo;
       render("(");
       render("SubjectPreposition");
       sh(_subjectpreposition.preposition_);
       render(")");
    }
    if (foo instanceof chalmersbot.Absyn.SubjectAdjective)
    {
       chalmersbot.Absyn.SubjectAdjective _subjectadjective = (chalmersbot.Absyn.SubjectAdjective) foo;
       render("(");
       render("SubjectAdjective");
       sh(_subjectadjective.adjective_);
       render(")");
    }
  }


  private static void pp(Integer n, int _i_) { buf_.append(n); buf_.append(" "); }
  private static void pp(Double d, int _i_) { buf_.append(d); buf_.append(" "); }
  private static void pp(String s, int _i_) { buf_.append(s); buf_.append(" "); }
  private static void pp(Character c, int _i_) { buf_.append("'" + c.toString() + "'"); buf_.append(" "); }
  private static void sh(Integer n) { render(n.toString()); }
  private static void sh(Double d) { render(d.toString()); }
  private static void sh(Character c) { render(c.toString()); }
  private static void sh(String s) { printQuoted(s); }
  private static void printQuoted(String s) { render("\"" + s + "\""); }
  private static void indent()
  {
    int n = _n_;
    while (n > 0)
    {
      buf_.append(" ");
      n--;
    }
  }
  private static void backup()
  {
     if (buf_.charAt(buf_.length() - 1) == ' ') {
      buf_.setLength(buf_.length() - 1);
    }
  }
  private static void trim()
  {
     while (buf_.length() > 0 && buf_.charAt(0) == ' ')
        buf_.deleteCharAt(0); 
    while (buf_.length() > 0 && buf_.charAt(buf_.length()-1) == ' ')
        buf_.deleteCharAt(buf_.length()-1);
  }
  private static int _n_ = 0;
  private static StringBuilder buf_ = new StringBuilder(INITIAL_BUFFER_SIZE);
}

